<template>
  <div class="result-search">
    <div class="cache-search" v-if="searchNames.length > 0">
      <div class="title">
        您光顾过的店
      </div>
      <ul class="cache-value">
        <li
          @click="clickSearch(name, 'cache')"
          v-for="(name,index) in searchNames"
          :key="index">{{name}}</li>
      </ul>
    </div>
  </div>
</template>

<script>
export default {
  methods: {
    clickSearch: function(name, type) {
      this.$emit('click-search', name, type)
    }
  },
  props: {
    "searchNames": {
      type: Array,
      default: () => []
    }
  }
}
</script>

<style lang="css" scoped>
</style>
